package com.neuedu.javase;

import java.util.Scanner;

/**
 * @auth 金山老师
 * title:   书籍代码
 * creatime: 2022-09-22 9:47
 * 描述 : 条件判断
 */
public class Operator8Switch {

    public static void main(String[] args) {

        /**
         * 根据输入的 分数转换成5级制
         * 
         */

        System.out.println("请输入分数>");
        int score = new Scanner(System.in).nextInt();

        int ten = score / 10;
        String level = "";

        switch (ten){
            case 10:
            case 9:
                level = "A";
                break;
            case 8:
                level = "B";
                break;
            case 7:
                level = "C";
                break;
            case 6:
                level = "D";
                break;
            case 5:
                level = "E";
                break;
            default:
                level = "数据异常";
                break;
        }

        System.out.println("level : "+level);
        
        
        



    }

}
